<route lang="json5" type="page">
{
  style: {
    navigationBarTitleText: '我的证书',
    navigationStyle: 'custom',
  },
}
</route>
<template>
  <view class="entire">
    <Backbar title="证书浏览" />
    <view class="container">
      <image
        style="z-index: -10; position: absolute; top: 0; width: 100%; height: 100%"
        :src="fundCertBg"
        mode="aspectFill"
      />
      <view style="position: absolute; top: 415rpx; left: 50%; transform: translate(-50%, 0)">
        {{ pageData.cert.engName }}
      </view>
      <view
        style="
          position: absolute;
          top: 575rpx;
          left: 235rpx;
          transform: translate(-50%, 0);
          font-size: 27rpx;
        "
      >
        {{ pageData.cert.name }}
      </view>
      <view
        style="
          position: absolute;
          top: 640rpx;
          left: 425rpx;
          transform: translate(-50%, 0);
          font-size: 22rpx;
        "
      >
        {{ pageData.cert.code }}
      </view>
      <view
        style="
          position: absolute;
          top: 705rpx;
          left: 390rpx;
          transform: translate(-50%, 0);
          font-size: 22rpx;
        "
      >
        {{ pageData.cert.time }}
      </view>
    </view>
    <view style="width: 100%; padding-top: 40rpx; display: flex; justify-content: center">
      <button style="color: #ffffff; background-color: #1b5b93" @click="nav">返回</button>
    </view>
  </view>
</template>

<script setup>
import { fundCertBg } from '@/static/imgMap'

const pageData = reactive({
  cert: {
    engName: null,
    name: null,
    code: null,
    time: null,
  },
})
const nav = () => {
  uni.navigateBack({ delta: 1 })
}
// 页面传参接受示例
onLoad((options) => {
  pageData.cert = JSON.parse(decodeURIComponent(options.cert))
  console.log('cert', pageData.cert)
})
</script>

<style scoped lang="scss">
.entire {
  width: 100%;
  .container {
    position: relative;
    margin-top: 25rpx;
    margin-left: 25rpx;
    width: 700rpx;
    height: 986rpx;
  }
}
</style>
